<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Voronoi Treemap 可视化工具</title>

<script src="d3.v6.min.js"></script>
<script src="d3-weighted-voronoi.js"></script>
<script src="d3-voronoi-map.js"></script>
<script src="d3-voronoi-treemap.js"></script>

<!-- 
本质上，这些库可以直接从CDN加载，如下所示：
<script src="https://d3js.org/d3.v6.min.js"></script>
<script src="https://rawcdn.githack.com/Kcnarf/d3-weighted-voronoi/v1.1.3/build/d3-weighted-voronoi.js"></script>
<script src="https://rawcdn.githack.com/Kcnarf/d3-voronoi-map/v2.1.1/build/d3-voronoi-map.js"></script>
<script src="https://rawcdn.githack.com/Kcnarf/d3-voronoi-treemap/v1.1.2/build/d3-voronoi-treemap.js"></script>
<script>
  var voronoiTreemap = d3.voronoiTreemap();
</script> -->


<link rel="stylesheet" href="style.css">
</head>
<body style="font-family:sans-serif">
<h2>🚗 电动汽车专利布局 Voronoi Treemap</h2>
<svg id="chart"></svg>

<script src="data.js"></script>
<script src="voronoiTreemapChart.js"></script>
<script>
  const chart = new VoronoiTreemapChart("#chart", { width: 900, height: 700 });
  chart.render(data);
</script>
</body>
</html>